package properties;
import java.io.*;
import java.util.*;

public class Greeting2
{
           String message;

          // class constructor

           public Greeting2()
           {

           }

     public void setMessage()
     {

          //create an instance of properties class

          Properties props = new Properties();

          //try retrieve data from file
             try {

             props.load(new FileInputStream("C:/workspace/TUTO/src/message.properties"));

             message = props.getProperty("message");

             System.out.println(message);
              }

             //catch exception in case properties file does not exist

             catch(IOException e)
             {
             e.printStackTrace();
             }
     }

     public static void main(String[] args)
     {
     //create an instance of greeting2 class

     Greeting2 gr = new Greeting2();

     //call the setMessage() method of the Greeting2 class

     gr.setMessage();
     
     for(int i=0; i<args.length; i++ )
    	 System.out.println(args[i] + " ");

     }
}     //end of source code file

